/*
 * YellowPageActor.java
 *
 * Created on January 12, 2006, 2:00 PM
 */

package aa.application.AdaptiveQuad;

import aa.core.Actor;
import aa.core.ActorName;


/**
 *
 * This actor maintains a list of the price of resources of all cyberorgs in the current platform
 * 
 * @author  xinghuizhao
 */
public class YellowPageActor extends Actor{
    
    ActorName bestFaci;
    
    Object[] current;
    
    int times;
    
    /** Creates a new instance of YellowPageActor */
    public YellowPageActor() {
        times=0;
        bestFaci = new ActorName("128.233.109.239",2);
    }
    
    public Object[] search() throws aa.core.CommunicationException{
        
        times++;
        
        if (times % 100 == 1){
             current=(Object[])call(new ActorName("128.233.109.239",3),"findBestDestination");
             return current;
        }
        else{
            return current;
        }
        
    }
    
}
